var status = -1;
var selectionLog = [];

function start(d, c, b) {
    if (status == 0 && d == 0) {
        qm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        qm.dispose()
    } else {
        if (status == a++) {
            qm.openCamera(1, 0, [1540756], [0], 7, 48, 47, 0);
            qm.getTopMsgFont("请通过W, A, S, D移动画面, 用鼠标点击上端的链环. ", 3, 20, 20, 0);
            qm.fieldEffect_ProcessOnOffLayer("WASD", "Map/Effect2.img/blackHeaven/fpsUI_WASD", 0, 0, 10, -10, 20, 6, 1);
            qm.fieldEffect_ProcessOnOffLayer("ESC", "Map/Effect2.img/blackHeaven/fpsUI_ESC", 0, 0, 0, 0, 20, 8, 1)
        } else {
            if (status == a++) {
                qm.curNodeEventEnd(true);
                qm.setInGameDirectionMode(true, false, true);
                qm.inGameDirectionEvent_AskAnswerTime(500)
            } else {
                if (status === a++) {
                    qm.fieldEffect_PlayFieldSound("Sound/Mob.img/8240045/Attack1", 100);
                    qm.inGameDirectionEvent_AskAnswerTime(1500)
                } else {
                    if (status === a++) {
                        qm.cameraSwitch_PushSwitchMoveInfo("pt_lookup", 2000);
                        qm.inGameDirectionEvent_AskAnswerTime(1000)
                    } else {
                        if (status === a++) {
                            qm.fieldEffect_PlayFieldSound("Sound/SoundEff.img/blackHeaven/metalcut", 100);
                            qm.npc_SetSpecialAction("oid=26211253", "cut", 0, 1);
                            qm.inGameDirectionEvent_AskAnswerTime(500)
                        } else {
                            if (status === a++) {
                                qm.npc_ChangeController(1540748, "oid=26212096", -372, 112, 69, -422, -322, 1, false, 0, false);
                                qm.npc_SetSpecialAction("oid=26212096", "summon", 0, 0);
                                qm.fieldEffect_PlayFieldSound("Sound/SoundEff.img/blackHeaven/metaldrop", 100);
                                qm.npc_SetSpecialAction("oid=26212096", "drop", 0, 1);
                                qm.npc_SetSpecialAction("oid=26211253", "cut2", -1, 1);
                                qm.inGameDirectionEvent_AskAnswerTime(1000)
                            } else {
                                if (status === a++) {
                                    qm.onSetBackEffect("down", 1, 1, 0, 0);
                                    qm.地图特效_开关落脚点([87], [0]);
                                    qm.addPopupSay(1540452, 2000, "……你怎么不早点使用这方法啊?", "", 0);
                                    qm.addPopupSay(1540453, 2000, "你的鞭子也很酷, 吉格蒙特. ", "", 0);
                                    qm.addPopupSay(1540451, 2000, "请加油, 吉格蒙特. 你的鞭子很棒. ", "", 0);
                                    qm.addPopupSay(1540452, 2000, "吵死了. ", "", 0);
                                    qm.setInGameDirectionMode(false, true, false);
                                    qm.forceCompleteQuest(33249);
                                    qm.dispose()
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

function stage0(d, c, b) {
    if (status == 0 && d == 0) {
        qm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        qm.dispose()
    } else {
        if (status == a++) {
            var e = qm.getQuest();
            qm.askYesNo("这个任务的依次对话脚本还没有修复哦。它的脚本位于： #b 脚本/任务/33233.js#k\r\n\r\n如果你有兴趣，欢迎一起来修复！\r\n\r\n那么现在，你要立刻开始这个任务吗？")
        } else {
            if (status == a++) {
                qm.forceStartQuest();
                qm.dispose()
            }
        }
    }
}

function end(d, c, b) {
    if (status == 0 && d == 0) {
        qm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        qm.dispose()
    } else {
        if (status == a++) {
            qm.curNodeEventEnd(true);
            qm.setInGameDirectionMode(true, false, true);
            qm.inGameDirectionEvent_SetAdditionalEffectVisibleForInGameDirection();
            qm.sendNormalTalk_Bottom("哼……你找到管道了吗？\r\n你在磨蹭什么，快走。", 37, 1540490, false, true)
        } else {
            if (status === a++) {
                qm.updateInfoQuest(33234, "start=0;done=1");
                qm.forceCompleteQuest(33234);
                qm.gainItem(4034271, -3);
                qm.dispose();
                qm.warp(350053250, 0, true);
                qm.npc_LeaveField("oid=284798173");
                qm.npc_LeaveField("oid=284798173");
                qm.setInGameDirectionMode(false, true, false);
                qm.dispose()
            }
        }
    }
};